function getMoneyNumber(num, scale)
{
	
	if ((distxt = num / 100000000) > 1)
	{
		return round(distxt , scale) + "亿";
	}else if ((distxt = num / 1000000) > 1)
	{
		return round(distxt*100, scale) + "万";
	}
	return round(num, scale) + "";
};


function getVolumeNumber(num, scale)
{
	
	if ((distxt = num / 100000000) > 1)
	{
		return round(distxt, scale) + "亿";
	}else if ((distxt = num / 1000000) > 1)
	{
		return round(distxt*100, scale) + "万";
	}
	return round(num, 0) + "";
};

function round(value, len)
{
		var v = Math.pow(10,len);
    return Math.round(value*v)/v;
};

function formatNumber(num, round)
{
	var number = new Number(num);
	return number.toFixed(round);
};


/*
function getTimeIndex(tstr)
{
	var mstr = tstr.substring(0,2);
	var h = parseInt(mstr, 10);

	
	var m = parseInt(tstr.substring(2,4), 10);
	var t = h*60 + m;
	t = t - 570;
	if (t > 120)
	{
		t -= 90;
	}
	return t;
}
function getTimeFromIndex(index)
{
	var result = "";
	var tindex = index + 570;
	var h = 0;
	var m = 0;
	tindex = index  > 119? tindex + 90 : tindex;
	h =parseInt( tindex / 60);
	m = tindex % 60;
	result = h < 10?("0" + h) :("" + h);
	result +=":";
	result += m < 10?"0"+m:""+m;
	return result;
	 
}



function getHKTimeIndex(tstr)
{
	var mstr = tstr.substring(0,2);
	var h = parseInt(mstr, 10);

	
	var m = parseInt(tstr.substring(2,4), 10);
	var t = h*60 + m;
	t = t - 570;
	if (t > 150)
	{
		t -= 60;
	}
	return t;
}
function getHKTimeFromIndex(index)
{
	var result = "";
	var tindex = index + 570;
	var h = 0;
	var m = 0;
	tindex = index  > 149? tindex + 60 : tindex;
	h =parseInt( tindex / 60);
	m = tindex % 60;
	result = h < 10?("0" + h) :("" + h);
	result +=":";
	result += m < 10?"0"+m:""+m;
	return result;
	 
}*/